﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using System;
using System.Collections.Generic;
using System.Text;

namespace FingerTip.Data
{
    public class MigrationsDbContextFactory:IDesignTimeDbContextFactory<FingerTipDbContext>
    {
        public FingerTipDbContext CreateDbContext(string[] args)
        {
            var builder = new DbContextOptionsBuilder<FingerTipDbContext>();
            builder.UseSqlServer("UsedForMigrationsOnlyUntilClassLibraryBugIsFixed");

            return new FingerTipDbContext(builder.Options);
        }
    }
}
